/* Global styles for the application */

:root {
  --primary-color: #1890ff;
  --primary-color-light: #e6f7ff;
  --primary-color-dark: #096dd9;
  --accent-color: #52c41a;
  --accent-color-light: #f6ffed;
  --accent-color-dark: #389e0d;
  --warning-color: #faad14;
  --error-color: #f5222d;
  --heading-color: #303133;
  --text-color: #606266;
  --text-color-secondary: #909399;
  --border-color: #ebeef5;
  --border-color-light: #f2f6fc;
  --background-color: #f5f7fa;
  --box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  --box-shadow-light: 0 2px 4px rgba(0, 0, 0, 0.05);
  --transition-duration: 0.3s;
  
  /* Sizes */
  --header-height: 64px;
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 60px;
  --border-radius-base: 4px;
  --border-radius-small: 2px;
  --border-radius-large: 8px;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 0.5em;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-duration);
}

a:hover {
  color: var(--primary-color-dark);
  text-decoration: underline;
}

/* Element Plus custom theme */
.el-button--primary {
  --el-button-bg-color: var(--primary-color);
  --el-button-border-color: var(--primary-color);
  --el-button-hover-bg-color: var(--primary-color-dark);
  --el-button-hover-border-color: var(--primary-color-dark);
}

.el-button--success {
  --el-button-bg-color: var(--accent-color);
  --el-button-border-color: var(--accent-color);
  --el-button-hover-bg-color: var(--accent-color-dark);
  --el-button-hover-border-color: var(--accent-color-dark);
}

.el-tag--primary {
  --el-tag-bg-color: var(--primary-color-light);
  --el-tag-border-color: var(--primary-color-light);
  --el-tag-text-color: var(--primary-color);
}

.el-tag--success {
  --el-tag-bg-color: var(--accent-color-light);
  --el-tag-border-color: var(--accent-color-light);
  --el-tag-text-color: var(--accent-color);
}

.el-menu {
  --el-menu-active-color: var(--primary-color);
  border-right: none !important;
}

.el-tabs__item.is-active {
  color: var(--primary-color);
}

.el-tabs__active-bar {
  background-color: var(--primary-color);
}

/* Cards and Containers */
.card {
  background-color: white;
  border-radius: var(--border-radius-base);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.container {
  padding: 20px;
}

/* Utility classes */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.full-width {
  width: 100%;
}

.full-height {
  height: 100%;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-row {
  flex-direction: row;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1;
}

.flex-grow {
  flex-grow: 1;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.gap-sm {
  gap: 8px;
}

.gap-md {
  gap: 16px;
}

.gap-lg {
  gap: 24px;
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-auto {
  overflow: auto;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

/* Custom scrollbar styles */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background-color: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background-color: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #a8a8a8;
}

/* Element Plus overrides */
.el-loading-mask {
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.el-loading-spinner .el-loading-text {
  color: white;
  font-size: 14px;
  font-weight: 500;
}

/* Animations */
.fade-enter-active,
.fade-leave-active {
  transition: opacity var(--transition-duration);
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.slide-up-enter-active,
.slide-up-leave-active {
  transition: transform var(--transition-duration), opacity var(--transition-duration);
}

.slide-up-enter-from,
.slide-up-leave-to {
  transform: translateY(20px);
  opacity: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 200px;
  }
  
  .hidden-sm {
    display: none !important;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .hidden-md {
    display: none !important;
  }
}